﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace MentorBackEnd.Model
{
    public class MemaUser
    {
        private int _MeMaUserID;

        public int MeMaUserID
        {
            get { return _MeMaUserID; }
            set { _MeMaUserID = value; }
        }

        private EnumTypes.MemaUserType _UserType;

        public EnumTypes.MemaUserType UserType
        {
            get { return _UserType; }
            set { _UserType = value; }
        }

        private string _FirstName;

        public string FirstName
        {
            get { return _FirstName; }
            set { _FirstName = value; }
        }


        private string _LastName;

        public string LastName
        {
            get { return _LastName; }
            set { _LastName = value; }
        }


        private string _Email;

        public string Email
        {
            get { return _Email; }
            set { _Email = value; }
        }

        
        private string _Password;

        public string Password
        {
            get { return _Password; }
            set { _Password = value; }
        }


        private bool _IsActive;

        public bool IsActive
        {
            get { return _IsActive; }
            set { _IsActive = value; }
        }


        public MemaUser() { }

        public MemaUser(IDataReader reader) 
        {
             if (reader == null) return;

             MeMaUserID = (int)reader["MeMaUserID"];
             UserType = (EnumTypes.MemaUserType)reader["UserTypeID"];
             FirstName = (string)reader["FirstName"];
             LastName = (string)reader["LastName"];
             Email = (string)reader["Email"];
             Password = (string)reader["Password"];
             IsActive = (bool)reader["IsActive"];
        }


    }
}